/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * RegisterView.java
 *
 * Created on Apr 28, 2010, 3:04:46 PM
 */
package ticketmaster.presentation;

import java.awt.Dimension;
import java.awt.Toolkit;
import ticketmaster.presentation.customer.CustomerRegisterPanel;

/**
 *
 * @author Wei Liu
 */
public class RegisterView extends javax.swing.JFrame
{

    /** Creates new form RegisterView */
    public RegisterView()
    {
        initFrame();
        initComponents();
        initRegisterPanel();
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        Dimension d = toolkit.getScreenSize();
        this.setLocation((int) (d.getWidth() - this.getWidth()) / 2, (int) (d.getHeight() - this.getHeight()) / 2);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlMain = new javax.swing.JPanel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setName("Form"); // NOI18N

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(ticketmaster.TicketMasterApp.class).getContext().getResourceMap(RegisterView.class);
        pnlMain.setBackground(resourceMap.getColor("pnlMain.background")); // NOI18N
        pnlMain.setName("pnlMain"); // NOI18N
        pnlMain.setPreferredSize(new java.awt.Dimension(750, 750));
        pnlMain.setLayout(new java.awt.BorderLayout());

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pnlMain, javax.swing.GroupLayout.DEFAULT_SIZE, 735, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pnlMain, javax.swing.GroupLayout.DEFAULT_SIZE, 704, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
     * @param args the command line arguments
     */
    public static void main(String args[])
    {
        java.awt.EventQueue.invokeLater(new Runnable()
        {

            public void run()
            {
                new RegisterView().setVisible(true);
            }
        });
    }

    private void initRegisterPanel()
    {
        CustomerRegisterPanel crp = new CustomerRegisterPanel();
        crp.setMainFrame(this);
        crp.setPnlParent(pnlMain);
        this.pnlMain.add(crp);
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel pnlMain;
    // End of variables declaration//GEN-END:variables

    private void initFrame()
    {
        this.setTitle("Register");
        this.setResizable(false);
    }
}
